package com.wj.rpsm.user.service.impl;

import com.wj.rpsm.user.mapper.AttentionMapper;
import com.wj.rpsm.user.pojo.Attention;
import com.wj.rpsm.user.pojo.vo.ForumVo;
import com.wj.rpsm.user.service.AttentionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author WeiJin
 * @version 1.0
 */
@Service
public class AttentionServiceImpl implements AttentionService {

    @Autowired
    private AttentionMapper attentionMapper;


    @Override
    public List<ForumVo> queryAttentionByUserId(Integer id) {
        return attentionMapper.queryAttentionByUserId(id);
    }

    @Override
    public Integer addAttention(Attention attention) {
        return attentionMapper.addAttention(attention);
    }

    @Override
    public Attention queryIsAttend(Attention attention) {
        return attentionMapper.queryIsAttend(attention);
    }

    @Override
    public Integer cancelAttention(Attention attention) {
        return attentionMapper.cancelAttention(attention);
    }

    @Override
    public Integer updateIsAttend(Attention attention) {
        return attentionMapper.cancelAttention(attention);
    }
}
